package com.eb.bi.common.util;


import java.text.DateFormat;
import java.util.Date;

public class DateProcessor {
	/**
	 * ���ϵͳ��ǰʱ�䣬��ʽ
	 */
	public String getNowFullTime(){
		Date now = new Date();
		DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM);
		String dataStr = df.format(now);
		String outDataStr = "";
		String timeFront = dataStr.split(" ")[0];
		String timeBack = dataStr.split(" ")[1];
		for(String s : timeFront.split("-")){
			if(s.length() < 2){
				outDataStr = outDataStr + "0" + s;
			}else{
				outDataStr = outDataStr + s;
			}
		}
		for(String s : timeBack.split(":")){
			if(s.length() < 2){
				outDataStr = outDataStr + "0" + s;
			}else{
				outDataStr = outDataStr + s;
			}
		}
		return outDataStr;
	}
	
	public static void main(String[] args){
		DateProcessor DateProcessor = new DateProcessor();
		System.out.println(DateProcessor.getNowFullTime());
	}
}
